﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MediaMonitor.Common;
using System.Data;

namespace MediaMonitor
{
    public partial class NewsAlert : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void lnkLastNewsAlert_Click(object sender, EventArgs e)
        {
            Response.Redirect("report-newalert.aspx");
        }

        protected void lnkPendingNewsAlert_Click(object sender, EventArgs e)
        {
            ReportFuncs rpt = new ReportFuncs();
            DataTable dt = rpt.GetReport_NewsAlertOnDate(Convert.ToInt32(Session["UserID"]));
            string date = dt.Rows[0]["LoginDate"].ToString();
            Response.Redirect("report-newalert.aspx?Date="+date+"&Code=Padding");
        }

        protected void lnkSearchforNewsAlert_Click(object sender, EventArgs e)
        {
            Response.Redirect("report-newsalert-filter.aspx");
        }

        protected void lnkToday_Click(object sender, EventArgs e)
        {
            ReportFuncs rpt = new ReportFuncs();
            DataTable dt = rpt.GetReport_NewsAlertOnDate(Convert.ToInt32(Session["UserID"]));
            string date = dt.Rows[0]["LoginDate"].ToString();
            Response.Redirect("report-newalertToday.aspx?Date=" + date);
        }
    }
}